package com.atguigu.boot_redis04.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author gcq
 * @Create 2021-01-11
 */
@Configuration
public class BootRedisConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 跳转到登录页面
        registry.addViewController("/login.html").setViewName("login"); // 登录
        registry.addViewController("/reg.html").setViewName("reg"); // 注册
    }
}